package com.bw.lib_storage.db

import androidx.room.TypeConverter
import java.util.Date

/**
 * @author ykj
 * @date 2025-09-15 19:54
 * @description
 */
class DataConverter {
    @TypeConverter
    fun fromTimestamp(value: Long?): Date? {
        return value?.let { Date(it) }
    }

    @TypeConverter
    fun dateToTimestamp(date: Date?): Long? {
        return date?.time
    }
}